{
	name:"CrossPoint",
	tool:"./paint_tool/points/point.shape",
	onFocusIn(){
		this.longToast("请分别选择俩条【相交】的线")
	},
	onClick(pos,e,meta){
		if(!this.active)return
		let path = this.queryLines(pos)
		if(path){
			this.step.push({
				path,pos
			})
			if(this.step.length==2)
				this.onCommit()
			else{
				this.hl(path,pos)
				this.toast("请选择第二条线段")
			}
		}else{
			this.toast("请选择任意线段")
		}
	},
	onCommit(){
		let state = this.getContextState()
		let metas = this.step.map(sp=>{
			return this.loadMngByAction(sp.path.action)
			.getLineMeta(sp.path,sp.pos)
		})
		let cp = Math.calcLineCrossPos(metas[0],metas[1])
		if(cp.para){
			this.toast("没有交点，请重新选择第二条线")
			this.step.pop()
			return
		}
		cp.type = "cross"
		this.step = [cp]
		this.commit(Action.Point,this.name)
	}
}